package org.webball.tools;

/**
 * 
 * @author Maciej Koch
 *
 */
public class CyclesCounter {
	
	private int time = 0;
	private int max;
	
	public CyclesCounter(int max) {
		this.max = max;
	}
	
	public void setMaxCycles(int max){
		this.max = max;
	}
	public boolean check() {
		time++;
		if(time > max) {
			time = 0;
			return true;
		}
		return false;
	}
}
